#ifndef _BRIDGEMESSAGE_HXX_
#define _BRIDGEMESSAGE_HXX_

#include "mytypes.h"
#include "mydll.h"
#include "was_api.h"
//

#define HEADERSIZE	24
#define	TAILSIZE	4

typedef struct tagBridgeMsg
{
	/* For Udp to determine the remote endpoint.*/
	string rhost;
	tUInt32 rport;

	tInt32	mpi;
	tInt32	tom;
	tInt32	tid;
	tInt32	rspc;
	tInt32	lom;
	tByte*	msg;
}tBridgeMsg;

#define ReleaseBridgeMsg(msg_in) \
if(NULL!=msg_in) \
{ \
     free(msg_in->msg); \
     delete msg_in; \
     msg_in=NULL; \
} \
else (void) 0

/** Create a copy of the msg */
EXPORT tBridgeMsg* DuplicateMsg(tBridgeMsg* msg);

EXPORT tChar* GetDataFromMsg(tBridgeMsg* msg,E_WAS_TAG_ID tag_id);

#endif //_BRIDGEMESSAGE_HXX_
